<template>
  <view class="container">
    <view style="padding: 20px">
      <uv-button type="primary" text="确定"></uv-button>
      <uv-button type="primary" :plain="true" text="镂空"></uv-button>
      <uv-button
        type="primary"
        :plain="true"
        :hairline="true"
        text="细边"
      ></uv-button>
      <uv-button type="primary" :disabled="disabled" text="禁用"></uv-button>
      <uv-button type="primary" loading loadingText="加载中"></uv-button>
      <uv-button type="primary" icon="map" text="图标按钮"></uv-button>
      <uv-button type="primary" shape="circle" text="按钮形状"></uv-button>
      <uv-button
        text="渐变色按钮"
        color="linear-gradient(to right, rgb(66, 83, 216), rgb(213, 51, 186))"
      ></uv-button>
      <uv-button type="primary" size="small" text="大小尺寸"></uv-button>
    </view>
    <uv-checkbox-group v-model="checkboxValue" @change="change">
      <uv-checkbox
        :customStyle="{ marginBottom: '8px' }"
        v-for="(item, index) in checkboxList"
        :key="index"
        :label="item.name"
        :name="item.name"
      ></uv-checkbox>
    </uv-checkbox-group>

    <uv-picker ref="picker" :columns="columns" @confirm="confirm"></uv-picker>
    <button @click="openPicker">打开</button>

    <view class="intro"
      >本项目已包含uni
      ui组件，无需import和注册，可直接使用。在代码区键入字母u，即可通过代码助手列出所有可用组件。光标置于组件名称处按F1，即可查看组件文档。</view
    >
    <text class="intro">详见：</text>
  </view>
</template>

<script setup>
import { onMounted, ref } from "vue";
import * as _ from "lodash";
import dayjs from "dayjs";
import { useCounterStore } from "@/stores/counter.js";
import { useQuery } from "vue-query";
// import oa from "@/pages/api/oa";
import test from "@/pages/api/test";

useQuery("sdaf", () => {
  // oa.getSendMsgList({ af: "s" })//小程序不可以用
  test.postMenu({ af: "s" });
});


	
const useCounter = useCounterStore();

var array = [1];
var other = _.concat(array, 2, [3], [[4]]);

console.log(other, dayjs().format(), useCounter);
// useCounter.count = 20;
const disabled = ref(false);
const checkboxValue = ref(["苹果"]);
// 基本案列数据
const checkboxList = [
  {
    name: "苹果",
    disabled: false,
  },
  {
    name: "香蕉",
    disabled: false,
  },
  {
    name: "橙子",
    disabled: false,
  },
];
const change = (detail) => {
  console.log(detail, "detail ");
  useCounter.count = 50;
};
const columns = [["中国", "美国", "日本"]];
const picker = ref(null);
const openPicker = () => {
  picker.value.open();
};
const confirm = (e) => {
  console.log("confirm", e);
};
// export default {
// 	data() {
// 		return {
// 			href: 'https://uniapp.dcloud.io/component/README?id=uniui'
// 		}
// 	},
// 	methods: {

// 	}
// }
</script>

<style>
.container {
  padding: 20px;
  font-size: 14px;
  line-height: 24px;
}
</style>
